
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="/css/admin.css" rel="stylesheet" type="text/css"></link>
<script type="text/javascript" src="/js/jquery.js"> </script>
<title>admin page</title>
</head>
<body>
  <div class="main">
    <ul>
    <?php 
    $conn = mysql_connect("127.0.0.1","root","");
    mysql_select_db("xingtan");

    $sql=sprintf("SELECT id, content, create_time FROM advices");
    $result = mysql_query($sql);

    while($row = mysql_fetch_array($result)) {
      printf('<li>%d <span style="color:blue;">%s</span> %s', $row['id'], $row['create_time'], $row['content']); 
    }
    mysql_close($conn);
    ?>
    </ul>
	</div>
</body>
